<template>
  <el-form-item
    v-if="selectedWidget.type === 'staticText'"
    :label="i18nt('designer.setting.textAlign')"
  >
    <el-radio-group v-model="optionModel.textAlign" class="radio-group-custom">
      <el-radio-button label="left" value="left">
        {{ i18nt('designer.setting.leftAlign') }}
      </el-radio-button>
      <el-radio-button label="center" value="center">
        {{ i18nt('designer.setting.centerAlign') }}
      </el-radio-button>
      <el-radio-button label="right" value="right">
        {{ i18nt('designer.setting.rightAlign') }}
      </el-radio-button>
    </el-radio-group>
  </el-form-item>
</template>

<script>
export default {
  name: 'TextAlignEditor',
  props: {
    designer: Object,
    selectedWidget: Object,
    optionModel: Object
  }
}
</script>

<style lang="scss" scoped>
.radio-group-custom {
  :deep(.el-radio-button__inner) {
    padding-left: 12px;
    padding-right: 12px;
  }
}
</style>
